Global Index
HTML5 JS API Index > Browser Tutorials & Specs

Navigator

Implements NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorPlugins.

Properties
DOMString
appCodeName
Must return the string "Mozilla".
DOMString
appName
Must return either the string "Netscape" or the full name of the browser, e.g. "Mellblom Browsernator".
DOMString
appVersion
Must return either the string "4.0" or a string representing the version of the browser in detail, e.g. "1.0 (VMS; en-US) Mellblomenator/9000".
boolean
cookieEnabled
The cookieEnabled attribute must return true if the user agent attempts to handle cookies according to the cookie specification, and false if it ignores cookie change requests. [COOKIES]
boolean
javaEnabled
The navigator.javaEnabled attribute must return true if the user agent supports a plugin that supports the MIME type "application/x-java-vm"; otherwise it must return false.
DOMString?
language
Must return a valid BCP 47 language tag representing either a plausible language or the user's most preferred language. [BCP47]
DOMString[]
languages
Must return a read only array of valid BCP 47 language tags representing either one or more plausible languages, or the user's preferred languages, ordered by preference with the most preferred language first. The same object must be returned until the user agent needs to return different values, or values in a different order.
MimeTypeArray
mimeTypes
The navigator.mimeTypes attribute must return a MimeTypeArray object. The same object must be returned each time.
boolean
onLine
The navigator.onLine attribute must return false if the user agent will not contact the network when the user follows links or when a script requests a remote page (or knows that such an attempt would fail), and must return true otherwise.
DOMString
platform
Must return either the empty string or a string representing the platform on which the browser is executing, e.g. "MacIntel", "Win32", "FreeBSD i386", "WebTV OS".
PluginArray
plugins
The navigator.plugins attribute must return a PluginArray object. The same object must be returned each time.
DOMString
product
Must return the string "Gecko".
DOMString
userAgent
Must return the string used for the value of the "User-Agent" header in HTTP requests, or the empty string if no such header is ever sent.
Operations
DOMString
isContentHandlerRegistered(DOMString mimeType, DOMString url)
The isContentHandlerRegistered() method must return the handler state string that most closely describes the current state of the handler described by the two arguments to the method, where the first argument gives the MIME type and the second gives the string used to build the URL of the page that will handle the requests.
DOMString
isProtocolHandlerRegistered(DOMString scheme, DOMString url)
The isProtocolHandlerRegistered() method must return the handler state string that most closely describes the current state of the handler described by the two arguments to the method, where the first argument gives the scheme and the second gives the string used to build the URL of the page that will handle the requests.
void
registerContentHandler(DOMString mimeType, DOMString url, DOMString title)
The registerProtocolHandler() method allows Web sites to register themselves as possible handlers for particular schemes. For example, an online telephone messaging service could register itself as a handler of the sms: scheme, so that if the user clicks on such a link, he is given the opportunity to use that Web site.
void
registerProtocolHandler(DOMString scheme, DOMString url, DOMString title)
The registerProtocolHandler() method allows Web sites to register themselves as possible handlers for particular schemes. For example, an online telephone messaging service could register itself as a handler of the sms: scheme, so that if the user clicks on such a link, he is given the opportunity to use that Web site.
boolean
taintEnabled()
Must return false.
void
unregisterContentHandler(DOMString mimeType, DOMString url)
The unregisterContentHandler() method must unregister the handler described by the two arguments to the method, where the first argument gives the MIME type and the second gives the string used to build the URL of the page that will handle the requests.
void
unregisterProtocolHandler(DOMString scheme, DOMString url)
The unregisterProtocolHandler() method must unregister the handler described by the two arguments to the method, where the first argument gives the scheme and the second gives the string used to build the URL of the page that will handle the requests.
void
yieldForStorageUpdates()
The yieldForStorageUpdates() method, when invoked, must, if the storage mutex is owned by the event loop of the task that resulted in the method being called, release the storage mutex so that it is once again free. Otherwise, it must do nothing.
Referenced by
Windownavigator